import request from '@/utils/request'
import { getPlaid } from '@/utils/auth'

const wechat_api = '/platform/work_wechat/apps/'

export function getWeWorkAppsList(page, size, search) {
  return request({
    url: wechat_api + 'index',
    method: 'get',
    params: { page, size, search }
  })
}

export function createForm(id) {
  return request({
    url: wechat_api + 'createForm',
    method: 'post',
    data: { id, plaid: getPlaid() }
  })
}

export function setDefault(id) {
  return request({
    url: wechat_api + 'setDefault',
    method: 'post',
    data: { id, plaid: getPlaid() }
  })
}
